<template>
    <h3>组合式api简约写法</h3>
    <p>{{ msg }}</p>
    <p>{{ reverse }}</p>
    <p>{{ demo }}</p>
</template>

<script setup>
import {ref,reactive,computed} from "vue"
import {myDemo} from "../util/MyDemo"
const msg=ref("简约")
const reverse=computed(()=>{
    //msg在逻辑里面读取的时候需要通过.value
    return msg.value.split("").reverse().join("")
})

const demo=myDemo(msg)

</script>